import hashlib

def check_token(token):
    md5_hash = hashlib.md5(token.encode()).hexdigest()
    if md5_hash[1] == md5_hash[14] == md5_hash[17]:
        try:
            first_char = int(md5_hash[1])
            fourteenth_char = int(md5_hash[14])
            seventeenth_char = int(md5_hash[17])
            thirtyfirst_char = int(md5_hash[31])
            if (first_char + fourteenth_char + seventeenth_char) / first_char == thirtyfirst_char:
                return True
        except ValueError:
            pass
    return False

# 生成可能的token值
def generate_tokens(length=10):
    import string
    import itertools
    chars = string.ascii_letters + string.digits
    for token in itertools.product(chars, repeat=length):
        yield ''.join(token)

# 检查最优的三种结果
def find_optimal_tokens(max_results=3):
    results = []
    for token in generate_tokens():
        if check_token(token):
            results.append(token)
            if len(results) >= max_results:
                break
    return results

# 找到最优的三种结果
optimal_tokens = find_optimal_tokens()
print("最优的三种结果：")
for token in optimal_tokens:
    print(token)

'''
最优的三种结果：
aaaaaaaacx
aaaaaaacGy
aaaaaaad2K
'''